package factory.one;

// 咖啡店
public class CoffeStore {

    public Coffee orderCoffee(String type){
        Coffee coffee = null;
        if("a".equals(type)){
            coffee = new AmeriacanCoffee();
        }else if("l".equals(type)){
            coffee = new LetteCoffe();
        }else{
            throw new RuntimeException("没有这种类型的咖啡");
        }

        coffee.addSugar();
        coffee.addMilk();

        return coffee;
    }
}
